class Fish{
	int weight;
}
class Lake{
	Fish fish;
	void setFish(Fish s){
		fish = s;
	}
	void eat(int n){
		fish.weight = fish.weight + n;
	}
}
class FishandLake{
	public static void main(String[] args) {
		Fish caoyu = new Fish();		    //创建对象caoyu（草鱼）
		System.out.println("草鱼初始重量:"+caoyu.weight+"\n");
		Lake taihu  = new Lake();		    //创建Lake类对象taihu (太湖)
		Lake qinghaihu  = new Lake();		    //青海湖
		Lake wuhuahu  = new Lake();		    //五花湖
		taihu.setFish(shiyanyu);		    //将草鱼放到太湖中
		qinghaihu.setFish(shiyanyu);		    //青海湖
		wuhuahu.setFish(shiyanyu);		    //五花湖

		System.out.println("让太湖中的草鱼吃食:10");
		taihu.eat(15);
		System.out.println("此时草鱼重量:"+caoyu.weight);
		System.out.println("太湖中草鱼重量:"+taihu.fish.weight);
		System.out.println("青海湖中草鱼重量:"+qinghaihu.fish.weight);
		System.out.println("五花湖中草鱼重量:"+wuhuahu.fish.weight+"\n");
		System.out.println("让青海湖里的鱼吃食:20");
		qinghaihu.eat(30);
		System.out.println("此时草鱼重量:"+caoyu.weight);
		System.out.println("太湖中草鱼重量:"+taihu.fish.weight);
		System.out.println("青海湖中草鱼重量:"+qinghaihu.fish.weight);
		System.out.println("五花湖中草鱼重量:"+wuhuahu.fish.weight+"\n");
		System.out.println("让五花湖里的草鱼吃食:30");
		wuhuahu.eat(50);
		System.out.println("此时草鱼重量:"+caoyu.weight);
		System.out.println("太湖中草鱼重量:"+taihu.fish.weight);
		System.out.println("青海湖中草鱼重量:"+qinghaihu.fish.weight);
		System.out.println("五花湖中草鱼重量:"+wuhuahu.fish.weight);
	}
}
